package com.hisysteTopet.hisystepet.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hisysteTopet.hisystepet.bean.IndentPet;
import com.hisysteTopet.hisystepet.bean.UserAndPet;
import com.hisysteTopet.hisystepet.mapper.IndentToPetMapper;
import com.hisysteTopet.hisystepet.service.IndentToPetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class IndentToPetToPetServiceImpl extends
        ServiceImpl<IndentToPetMapper, IndentPet> implements IndentToPetService {

    @Autowired
    private IndentToPetMapper indentMapper;

    @Override
    public List<IndentPet> selectAllIndentByUsername(String username) {
        return indentMapper.selectAllIndentByUsername(username);
    }


    @Override
    public void insertIntend(Double sum_money, Date data, String address,String username
                            ,Integer petId,Integer petNum,String petName) {
        indentMapper.insertIntend(sum_money,data,address,username,petId,petNum,petName);
    }

    @Override
    public List<UserAndPet> selectIntendToPet(String username) {
        return indentMapper.selectIntendToPet(username);
    }

    @Override
    public List<IndentPet> selectAllIndent(Integer pageNum, Integer page) {
        return null;
    }


}
